import Mock from 'mockjs2'
import { builder, getQueryParameters, pageData } from '../util'
import stockDatas from '@/assets/data/allStockJson'

const stockPage = (options) => {
  const params = getQueryParameters(options)
  console.log(params)
  const result = pageData(stockDatas, params)
  return builder(result)
}

Mock.mock(/\/stock\/page/, 'get', stockPage)
